<template>
    <div class="newsInfo-container">
        <!--大标题-->
        <h3 class="mainTitle">标题</h3>

        <!--子标题-->
        <p class="subTitle">
            <span>发表时间：2019-10-20  12:45:09</span>
            <span>点击：5次</span>
        </p>

        <!--内容区域-->
        <div class="content" v-html="">内容区域</div>

        <!--评论子组件区域-->
        <comment-box :id="this.id"></comment-box>

    </div>

</template>

<script>
    import {Toast} from 'mint-ui'
    import comment from '../subcomponents/comment.vue'

    export default {
        name: "NewsInfo",
        data(){
            return{
                newsId:this.$route.params.id,
                newsList:{}
            }
        },
        created() {
            Toast('加载了');
            // this.getNewsInfo();
        },
        methods:{
            getNewsInfo(){
                this.$http.get('').then(result=>{
                    if (result.status === 0) {
                        // this.newsList = result
                    }else{
                        Toast('加载失败了');
                    }
                })
            }
        },
        components:{
            'comment-box':comment
        }
    }
</script>

<style lang="scss" scoped>

    .newsInfo-container{
        padding: 0 4px;
        .mainTitle{
            color: red;
            font-size: 16px;
            text-align: center;
        }
        .subTitle{
            color: #007aff;
            font-size: 13px;
            display: flex;
            justify-content: space-between;
        }
        .content{
            img{
                width: 100%;
            }
        }
    }


</style>
